package frsf.cidisi.exercise.idemiatp.situationCalculus;


import frsf.cidisi.exercise.idemiatp.situationCalculus.AgenteArqueologo;
import frsf.cidisi.exercise.idemiatp.situationCalculus.AmbienteIsla;
import frsf.cidisi.exercise.idemiatp.situationCalculus.StateIsla;
import frsf.cidisi.faia.agent.Agent;
import frsf.cidisi.faia.agent.situationcalculus.SituationCalculusPerception;
import frsf.cidisi.faia.environment.Environment;

public class AgenteArqueologoPerception extends SituationCalculusPerception {

  	
	//TODO: Setup Sensors
	private Tesoro camara;
	private Grafo satelite;
	private String gps;
	
 

    public  AgenteArqueologoPerception() {
    	//TODO: Complete Method
    	camara = new Tesoro();
    	satelite = new Grafo();
    	gps = new String();
    }
    
    @Override
    public void initPerception(Agent agent, Environment environment) {
    	 AgenteArqueologo agente = (AgenteArqueologo) agent;
         AmbienteIsla entorno = (AmbienteIsla) environment;
         StateIsla estadoEntorno = entorno.getEnvironmentState();
        
         gps = estadoEntorno.getPosicionArquelogo();
         camara = estadoEntorno.getTesoro(gps).clone();
         satelite = estadoEntorno.getMapa().clone();
    }

    @Override
    public String toString() {
        StringBuffer perceptionString = new StringBuffer("perception(" +
        		this.getGps().toLowerCase() + ","+
        		this.camara.valor + "," +
        		this.camara.peso + ")");

        
        
        //TODO: Complete Method

        return perceptionString.toString();
    }

	public Tesoro getCamara() {
		return camara;
	}

	public void setCamara(Tesoro camara) {
		this.camara = camara;
	}

	public Grafo getSatelite() {
		return satelite;
	}

	public void setSatelite(Grafo satelite) {
		this.satelite = satelite;
	}

	public String getGps() {
		return gps;
	}

	public void setGps(String gps) {
		this.gps = gps;
	}
    
    
     

}
